package com.didispace.mytest;

import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.stereotype.Component;

@Component
@EnableBinding(value= {MyProcessor.class,Sink.class})
public class MessageListener {

	@StreamListener(MyProcessor.MYINPUT)
    public void input(String message){
        System.out.println("MyProcessorMYINPUT获取到的消息是："+message);
    }
	
	@StreamListener(Sink.INPUT)
    public void input2(String message){
        System.out.println("Sink获取到的消息是："+message);
    }
}
